<?php
$jsonString = '[{"code":"203020","num":1},{"code":"202010","num":1}]';
$data = json_decode($jsonString, true);

$result = '[';
foreach ($data as $key => $item) {
if ($key > 0) {
$result .= ',';
}
$result .= '{' . $item['code'] . ',' . $item['num'] . '}';
}
$result .= ']';

echo $result; // Output: [{203020,1},{202010,1}]